home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / g++1.mips / utils.mk < prev    next >
Makefile  |  1992-03-13  |  2KB  |  72 lines

  1. #
  2. # This Makefile is a special one for the cc1 program (the main portion of
  3. # the GNU C compiler).  The purpose of this Makefile is to generate
  4. # executable copies of several utility programs, which are then used
  5. # to generate source files for the compiler from a description of the
  6. # machine for which the compiler is to generate code.  This Makefile
  7. # must be separate from the main Makefile, and must be processed in
  8. # a separate invocation of Pmake, because its target machine must be
  9. # the machine on which we're executing now, not the machine on which
  10. # the compiler is to execute.
  11. #
  12. # $Header: /sprite/src/cmds/g++1.68k/RCS/utils.mk,v 1.2 91/05/23 18:10:41 kupfer Exp $
  13. #
  14.  
  15. MACHINES     = $(TM)
  16. SRCDIR        ?= ../cc/dist
  17. #
  18. # changed the TM from sun3, and CC from cc
  19. #
  20. TM        ?= ds3100
  21. CC        = gcc
  22. LIBS        ?=
  23. XCFLAGS        ?=
  24.  
  25. .PATH.h        : ../cc/sprite $(SRCDIR) /sprite/lib/include \
  26.             /sprite/lib/include/$(TM).md
  27.  
  28. #include    <tm.mk>
  29. #
  30. # removed the -g flag
  31. #
  32. CFLAGS         = -O $(TMCFLAGS) -I. $(.INCLUDES) $(XCFLAGS)
  33.  
  34. all        : $(TM).md/genconfig $(TM).md/genflags $(TM).md/gencodes \
  35.             $(TM).md/genemit $(TM).md/genrecog \
  36.             $(TM).md/genextract $(TM).md/genpeep \
  37.             $(TM).md/genoutput
  38. #
  39. # The targets below are for a bunch of utility programs used to generate
  40. # C files for machine-dependent aspects of the compiler.  Things are a
  41. # little tricky here:  these programs have to be generated to run on
  42. # the current machine ($MACHINE).
  43. #
  44.  
  45. MAKEGEN:    .USE $(TM).md/rtl.o $(TM).md/obstack.o $(LIBS)
  46.     $(RM) -f $(.TARGET)
  47.     $(CC) $(CFLAGS) -o $(.TARGET) $(.ALLSRC:N*.h:N*.def)
  48.  
  49. $(TM).md/genconfig        : $(SRCDIR)/genconfig.c MAKEGEN
  50. $(TM).md/genflags        : $(SRCDIR)/genflags.c MAKEGEN
  51. $(TM).md/gencodes        : $(SRCDIR)/gencodes.c MAKEGEN
  52. $(TM).md/genemit        : $(SRCDIR)/genemit.c MAKEGEN
  53. $(TM).md/genrecog        : $(SRCDIR)/genrecog.c MAKEGEN
  54. $(TM).md/genextract        : $(SRCDIR)/genextract.c MAKEGEN
  55. $(TM).md/genpeep        : $(SRCDIR)/genpeep.c MAKEGEN
  56. $(TM).md/genoutput        : $(SRCDIR)/genoutput.c MAKEGEN
  57.  
  58. #
  59. # Targets to generate the .o files that must be linked with the files
  60. # above.
  61.  
  62. MAKEOBJ:    .USE
  63.     $(RM) -f $(.TARGET)
  64.     $(CC) $(CFLAGS) -c -o $(.TARGET) $(.ALLSRC:N*.h:N*.def)
  65.  
  66. $(TM).md/obstack.o        : obstack.c MAKEOBJ
  67. $(TM).md/rtl.o            : rtl.c MAKEOBJ
  68.  
  69. #if exists($(TM).md/dependencies.mk)
  70. #include    "$(TM).md/dependencies.mk"
  71. #endif
  72.